package test;

/**
 * @author oldliu
 * @since 1.0
 */
public class StrToDboule {
    public static void main(String[] args) {
        String str="233.666abc3333";
        while (true){
            if(str.length()==0)
            {
                System.out.println("不行");
                break;
            }
           try {
               double d = Double.parseDouble(str);
               System.out.println(d);
               break;
           }catch (Exception e){
               str=str.substring(0,str.length()-1);//!!!!!!
           }
        }
    }
}
